import { createApp } from 'vue';
import pinia from '@/store';
import App from './App.vue';
import router from '@/router';
import TDesign from 'tdesign-vue-next';
import VueGridLayout from 'vue-grid-layout';
// custom directives
import directives from '@/directives/index';
// 引入组件库全局样式资源
import 'tdesign-vue-next/es/style/index.css';
import 'nprogress/nprogress.css';
// import '@/assets/css/theme/mixin.scss'
import '@/assets/css/layout.scss';
import '@/assets/css/public.scss';
import '@/assets/css/bh_tdesign.scss';
import * as Icons from 'tdesign-icons-vue-next';
//Particles
import Particles from 'vue3-particles';
// 创建vue实例
const app = createApp(App);
Object.keys(Icons).forEach(key => {
  app.component(key, Icons[key as keyof typeof Icons]);
});
// 挂载
app.use(pinia)
  .use(router)
  .use(directives)
  .use(TDesign)
  .use(VueGridLayout)
  .use(Particles);
// 挂载实例
app.mount('#app');
